package org.lhl

import javafx.application.Platform
import javafx.fxml.FXMLLoader
import javafx.fxml.JavaFXBuilderFactory
import javafx.scene.Parent
import javafx.scene.Scene
import javafx.stage.Stage

/**
 * Author:  LuoHaoLun
 * Email :  506503279@qq.com
 * Date  :  2021/4/13
 */
class Start {
    fun init(stage: Stage) {
        val fxmlLoader = FXMLLoader()
        fxmlLoader.location = javaClass.getResource("/sample.fxml")
        fxmlLoader.builderFactory = JavaFXBuilderFactory()
        val root = fxmlLoader.load<Parent>()
        stage.title = "地图切片加密程序"
        stage.scene = Scene(root)
        stage.setOnCloseRequest { Platform.exit() }
        stage.show()
    }
}